import collections
file=open("history.txt")
visited_counter = collections.Counter()
target_counter = collections.Counter()

for line in file:
  [pc,ds,hit] = line.split()
  visited_counter[pc] += 1
  target_counter[ds] += 1
print 'the turn number:',len(visited_counter)
print 'the most commonis :\n',visited_counter.most_common(10)
print 'the target number :',len(target_counter)
print 'the most common target is :\n', target_counter.most_common(10)
    

  